<template>
  <swiper class="home-swiper">
    <swiper-item v-for="item in cbanners" :key="item.image">
      <a :href="item.link">
        <img :src="item.image" alt="" @load="homeSwiperImgLoad">
      </a>
    </swiper-item>
  </swiper>
</template>

<script>
  import {Swiper, SwiperItem} from 'components/common/swiper';
  export default {
    name: "HomeSwiper",
    data() {
      return {
        isload: false
      }
    },
    props: {
      cbanners:{
        type:Array,
        default() {
            return []
        }
      }
    },
    components:{
        Swiper,SwiperItem
    },
    methods: {
      homeSwiperImgLoad() {
        if (!this.isload) {
          // console.log('homeSwiperImgLoad组件');
          this.$emit('homeSwiperImgLoad')
          this.isload = true
        }
      }
    }
  }
</script>

<style>


</style>
